<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class template basic_settings</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Chapter 1. Boost.Log v2">
<link rel="up" href="../../utilities.html#header.boost.log.utility.setup.settings_hpp" title="Header &lt;boost/log/utility/setup/settings.hpp&gt;">
<link rel="prev" href="init_from_stream.html" title="Function template init_from_stream">
<link rel="next" href="basic_settings_section.html" title="Class template basic_settings_section">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="init_from_stream.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../utilities.html#header.boost.log.utility.setup.settings_hpp"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="basic_settings_section.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.log.basic_settings"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template basic_settings</span></h2>
<p>boost::log::basic_settings — The class represents settings container. </p>
</div>
<h2 class="refsynopsisdiv-title">Synopsis</h2>
<div class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../utilities.html#header.boost.log.utility.setup.settings_hpp" title="Header &lt;boost/log/utility/setup/settings.hpp&gt;">boost/log/utility/setup/settings.hpp</a>&gt;

</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> CharT<span class="special">&gt;</span> 
<span class="keyword">class</span> <a class="link" href="basic_settings.html" title="Class template basic_settings">basic_settings</a> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">log</span><span class="special">::</span><span class="identifier">basic_settings_section</span><span class="special">&lt;</span> <span class="identifier">CharT</span> <span class="special">&gt;</span> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
  <span class="comment">// types</span>
  <span class="keyword">typedef</span> <a class="link" href="basic_settings_section.html" title="Class template basic_settings_section">basic_settings_section</a><span class="special">&lt;</span> <span class="identifier">CharT</span> <span class="special">&gt;</span> <a name="boost.log.basic_settings.section"></a><span class="identifier">section</span><span class="special">;</span>             <span class="comment">// Section type. </span>
  <span class="keyword">typedef</span> <span class="identifier">section</span><span class="special">::</span><span class="identifier">property_tree_type</span>     <a name="boost.log.basic_settings.property_tree_type"></a><span class="identifier">property_tree_type</span><span class="special">;</span>  <span class="comment">// Property tree type. </span>

  <span class="comment">// <a class="link" href="basic_settings.html#boost.log.basic_settingsconstruct-copy-destruct">construct/copy/destruct</a></span>
  <a class="link" href="basic_settings.html#idm39727-bb"><span class="identifier">basic_settings</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="basic_settings.html#idm39730-bb"><span class="identifier">basic_settings</span></a><span class="special">(</span><a class="link" href="basic_settings.html" title="Class template basic_settings">basic_settings</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="basic_settings.html#idm39736-bb"><span class="identifier">basic_settings</span></a><span class="special">(</span>this_type <span class="special">&amp;&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">explicit</span> <a class="link" href="basic_settings.html#idm39742-bb"><span class="identifier">basic_settings</span></a><span class="special">(</span><span class="identifier">property_tree_type</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="basic_settings.html" title="Class template basic_settings">basic_settings</a> <span class="special">&amp;</span> <a class="link" href="basic_settings.html#idm39750-bb"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><a class="link" href="basic_settings.html" title="Class template basic_settings">basic_settings</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="basic_settings.html" title="Class template basic_settings">basic_settings</a> <span class="special">&amp;</span> <a class="link" href="basic_settings.html#idm39758-bb"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><a class="link" href="basic_settings.html" title="Class template basic_settings">basic_settings</a> <span class="special">&amp;&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <a class="link" href="basic_settings.html#idm39747-bb"><span class="special">~</span><span class="identifier">basic_settings</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="idm94390"></a><h2>Description</h2>
<p>All settings are presented as a number of named parameters divided into named sections. The parameters values are stored as strings. Individual parameters may be queried via subscript operators, like this:</p>
<p><code class="computeroutput"><pre class="programlisting">
<span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">string</span> <span class="special">&gt;</span> <span class="identifier">param</span> <span class="special">=</span> <span class="identifier">settings</span><span class="special">[</span><span class="string">"Section1"</span><span class="special">]</span><span class="special">[</span><span class="string">"Param1"</span><span class="special">]</span><span class="special">;</span> <span class="comment">// reads parameter "Param1" in section "Section1"</span>
                                                           <span class="comment">// returns an empty value if no such parameter exists</span>
<span class="identifier">settings</span><span class="special">[</span><span class="string">"Section2"</span><span class="special">]</span><span class="special">[</span><span class="string">"Param2"</span><span class="special">]</span> <span class="special">=</span> <span class="number">10</span><span class="special">;</span> <span class="comment">// sets the parameter "Param2" in section "Section2"</span>
                                     <span class="comment">// to value "10"</span>
</pre></code></p>
<p>There are also other methods to work with parameters. </p>
<div class="refsect2">
<a name="idm94425"></a><h3>
<a name="boost.log.basic_settingsconstruct-copy-destruct"></a><code class="computeroutput">basic_settings</code> 
        public
       construct/copy/destruct</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><a name="idm39727-bb"></a><span class="identifier">basic_settings</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Default constructor. Creates an empty settings container. </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="idm39730-bb"></a><span class="identifier">basic_settings</span><span class="special">(</span><a class="link" href="basic_settings.html" title="Class template basic_settings">basic_settings</a> <span class="keyword">const</span> <span class="special">&amp;</span> that<span class="special">)</span><span class="special">;</span></pre>
<p>Copy constructor. </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="idm39736-bb"></a><span class="identifier">basic_settings</span><span class="special">(</span>this_type <span class="special">&amp;&amp;</span> that<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Move constructor. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">explicit</span> <a name="idm39742-bb"></a><span class="identifier">basic_settings</span><span class="special">(</span><span class="identifier">property_tree_type</span> <span class="keyword">const</span> <span class="special">&amp;</span> tree<span class="special">)</span><span class="special">;</span></pre>
<p>Initializing constructor. Creates a settings container with the copy of the specified property tree. </p>
</li>
<li class="listitem">
<pre class="literallayout"><a class="link" href="basic_settings.html" title="Class template basic_settings">basic_settings</a> <span class="special">&amp;</span> <a name="idm39750-bb"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><a class="link" href="basic_settings.html" title="Class template basic_settings">basic_settings</a> <span class="keyword">const</span> <span class="special">&amp;</span> that<span class="special">)</span><span class="special">;</span></pre>
<p>Copy assignment operator. </p>
</li>
<li class="listitem">
<pre class="literallayout"><a class="link" href="basic_settings.html" title="Class template basic_settings">basic_settings</a> <span class="special">&amp;</span> <a name="idm39758-bb"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><a class="link" href="basic_settings.html" title="Class template basic_settings">basic_settings</a> <span class="special">&amp;&amp;</span> that<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Move assignment operator. </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="idm39747-bb"></a><span class="special">~</span><span class="identifier">basic_settings</span><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Destructor </p>
</li>
</ol></div>
</div>
</div>
</div>
<div class="copyright-footer">Copyright © 2007-2024 Andrey Semashev<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>).
      </p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="init_from_stream.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../utilities.html#header.boost.log.utility.setup.settings_hpp"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="basic_settings_section.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
